package org.example.intelligent_education.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;

@Mapper
public interface AdminMapper {
    @Insert("INSERT INTO course_info (cname, caname, tname,synopsis,price) " +
            "VALUES (#{cname}, #{caname}, #{tname}, #{synopsis}, #{price})")
    Integer addCourse(String cname, String caname, String tname, String synopsis, BigDecimal price);

    @Update("update course_info set del =1 where cid = #{cid}")
    Integer delCourse(int cid);


}
